
* ================================================================================================================ *
* Public Support for Green, Inclusive, and Resilient Growth Conditionality in International Monetary Fund Bailouts *
* Authors: Mirko Heinzel, Saliha Metinsoy, Andreas Kern, Benhard Reinsberg                                         *
* Version: 02.11.2024                                                                                              *
* Stata 16.2                                                                                                       *
* ================================================================================================================ *

*cd "Location of extracted files"

*Install packages
ssc install estout
ssc install coefplot
ssc install reghdfe
ssc install blindschemes

*Figure 1: conditionality over time
use "IMFMonitor_Conditions_Main.dta", clear
collapse (sum) BA1DEB BA1ENV BA1EXT BA1FIN BA1FP BA1INS BA1LAB BA1OTH BA1POV BA1PRI BA1RTP BA1SOE BA1SP BA1TOT, by(year)

gen share_env= BA1ENV/BA1TOT
gen share_ins= BA1INS/BA1TOT
gen share_pov= BA1POV/BA1TOT
gen share_soc= BA1SP/BA1TOT

gen perc_env=share_env*100
gen perc_ins=share_ins*100
gen perc_pov=share_pov*100
gen perc_soc=share_soc*100

graph bar perc_pov perc_ins perc_soc perc_env, over(year) scheme(plotplainblind) stack ylabel(0(1)15)

*Figure 2: support for IMF programs
use  "IMF_survey_experiment.dta", clear

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ  , atmeans post
eststo support

coefplot support  , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure 3: pay taxes and spending cuts
reghdfe taxes i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo taxes

reghdfe cuts i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo cuts

coefplot taxes cuts  , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure 4: simulation

foreach x of varlist invest tariff debt corrupt poverty privatize climate genderequ{
gen zero_`x'=`x' 
replace zero_`x'=0 if zero_`x'==2
}

reghdfe support zero_invest zero_tariff zero_debt zero_corrupt zero_poverty zero_privatize zero_climate zero_genderequ [pw = weight] , absorb(qcountry) cluster(id)

predict yhat
predict se, stdp
gen lb = yhat - 1.96*se
gen ub = yhat + 1.96*se

*display values
*WC
sum yhat if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==0 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0
sum lb if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==0 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0
sum ub if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==0 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0

*yhat 3.290392
*lb 3.155816
*up 3.424968

*PWC
*WC
sum yhat if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0
sum lb if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0
sum ub if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==0 & zero_climate==0 & zero_genderequ==0

*yhat 3.631534
*lb 3.500903
*up 3.762166

*GRID
*WC
sum yhat if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==1 & zero_climate==1 & zero_genderequ==1
sum lb if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==1 & zero_climate==1 & zero_genderequ==1
sum ub if zero_invest==1 & zero_tariff==1 & zero_debt==1 & zero_privatize==1 & zero_corrupt==1 & zero_poverty==1 & zero_climate==1 & zero_genderequ==1

*yhat 4.083112
*lb 3.952685
*up 4.213538

*create plot
clear all 
matrix C = J(3,3,.)

matrix input C = (3.290392,3.155816, 3.424968 \ 3.631534,3.500903,3.762166 \4.083112, 3.952685, 4.213538)

matrix colnames C = estimate ll95 ul95
matrix rownames C = WC PWC GRID
matrix list C
coefplot matrix(C[,1]), ci((C[,2] C[,3])) scheme(plotplainblind) xlabel(3(0.5)4.5)

*Figure 5: by ideology
use  "IMF_survey_experiment.dta", clear

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if q4==1 | q4==2 , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_lw

*centre
reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if q4==3 | q4==4 , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_center

*right
reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if q4==5 | q4==6, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_rw

coefplot support_lw support_center support_rw , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")


*Figure 6: by gender
reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if gender_all==1 , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_men

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if gender_all==2 , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_women

coefplot support_men support_women, xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}") drop(_cons)


************
* Appendix *
************

*Figure A1: Argentina by age
graph bar (percent) count_obs if qcountry==2, over(age_grp_all) scheme(plotplainblind) legend(off)

*Figure A2: Kenya by age
graph bar (percent) count_obs if qcountry==1, over(age_grp_all) scheme(plotplainblind) legend(off) 

*Figure A3: Pakistan by age
graph bar (percent) count_obs if qcountry==3, over(age_grp_all) scheme(plotplainblind) legend(off) 

*Figure A4: Argentina by gender
graph bar (percent) count_obs if qcountry==2, over(gender_all) scheme(plotplainblind) legend(off)

*Figure A5: Kenya by gender
graph bar (percent) count_obs if qcountry==1, over(gender_all) scheme(plotplainblind) legend(off)

*Figure A6: Pakistan by age
graph bar (percent) count_obs if qcountry==3, over(gender_all) scheme(plotplainblind) legend(off)

*Figure A7: Argentina by education
graph bar (percent) count_obs, over(education_Ar) scheme(plotplainblind) legend(off) 

*Figure A8: Kenya by education
graph bar (percent) count_obs, over(DEM4_Ken) scheme(plotplainblind) legend(off)

*Figure A9: Pakistan by education
graph bar (percent) count_obs, over(education_Pak) scheme(plotplainblind) legend(off)

*Figure A10: Argentina by income
graph bar (percent) count_obs, over(income_Ar) scheme(plotplainblind) legend(off)

*Figure A11: Kenya by income
graph bar (percent) count_obs, over(income_Ken) scheme(plotplainblind) legend(off)

*Figure A12: Pakistan by income
graph bar (percent) count_obs, over(income_Pak) scheme(plotplainblind) legend(off)

*Figure A13: weights Argentina
hist weight if qcountry==2, scheme(plotplainblind) xlabel(0(1)5) frac

*Figure A14: weights Kenya
hist weight if qcountry==1, scheme(plotplainblind) xlabel(0(1)5) frac

*Figure A15: weights Pakistan
hist weight if qcountry==3, scheme(plotplainblind) xlabel(0(1)5) frac

*Table A16: comparing sample with other LMICs in World Value Survey 2017-2022
use "WVS_TimeSeries_4_0.dta", clear
keep if S002VS==7
gen hic=1 if COUNTRY_ALPHA=="DEU"
replace hic=1 if COUNTRY_ALPHA=="AUS"
replace hic=1 if COUNTRY_ALPHA=="CAN"
replace hic=1 if COUNTRY_ALPHA=="KOR"
replace hic=1 if COUNTRY_ALPHA=="NLD"
replace hic=1 if COUNTRY_ALPHA=="NZL"
replace hic=1 if COUNTRY_ALPHA=="SGP"
replace hic=1 if COUNTRY_ALPHA=="USA"
replace hic=1 if COUNTRY_ALPHA=="TWN"

replace hic=0 if missing(hic)

drop if hic==1

gen survey_countries=1 if COUNTRY_ALPHA=="KEN"
replace survey_countries=1 if COUNTRY_ALPHA=="ARG"
replace survey_countries=1 if COUNTRY_ALPHA=="PAK"
replace survey_countries=0 if missing(survey_countries)

replace C001=. if C001<0
replace C001=4 if C001==3
replace C001=3 if C001==2
replace C001=2 if C001==4

replace E224=. if E224<0
replace B008=. if B008<0
replace B008=. if B008==3

replace E069_45=. if E069_45<0
replace E268=. if E069_45<0
replace E035=. if E069_45<0
replace E036=. if E069_45<0

*E224 tax the rich to help poor
*C001 men more right to job than women
*B008 environment versus econ growth
*E069_45 IMF confidence
*E268 Corruption
*E035 income inequality
*E036 private ownership

replace E035=abs(E035-10)
replace E036=abs(E036-10)
replace B008=abs(B008-2)

gen sd_C001=C001
gen sd_E224=E224
gen sd_B008=B008
gen sd_E069_45=E069_45
gen sd_E035=E035
gen sd_E036=E036
gen sd_E268=E268

gen total=1
egen countries=group(COUNTRY_ALPHA)

collapse (mean) C001 E224 B008 E069_45 E268 E035 E036 (sd) sd_C001 sd_E224 sd_B008 sd_E069_45 sd_E035 sd_E036 sd_E268 (sum) total (count) countries, by(survey_countries)

foreach x of varlist C001 E224 B008 E069_45 E268 E035 E036  {
rename `x' mean_`x'

}

reshape long mean_, i(survey_countries) j(variables, string)

gen sd_=sd_C001 if variables=="C001"
replace sd_=sd_E224 if variables=="E224"
replace sd_=sd_B008 if variables=="B008"
replace sd_=sd_E069_45 if variables=="E069_45"
replace sd_=sd_E035 if variables=="E035"
replace sd_=sd_E036 if variables=="E036"
replace sd_=sd_E268 if variables=="E268"

drop sd_C001 sd_E224 sd_B008 sd_E069_45 sd_E035 sd_E036 sd_E268 countries
gen id=1
reshape wide mean_ sd_ total, i(variables) j(survey_countries)
drop id
order variables mean_1 sd_1 total1 mean_0 sd_0 total0
rename mean_1 mean_included
rename sd_1 sd_included
rename total1 n_included
rename mean_0 mean_not_included
rename sd_0 sd_not_included
rename total0 n_not_included
gen varname="IMF confidence" if variables=="E069_45"
replace varname="Private ownership" if variables=="E036"
replace varname="Corruption" if variables=="E268"
replace varname="Address income inequality" if variables=="E035"
replace varname="Gender equality" if variables=="C001"
replace varname="Environment" if variables=="B008"
drop if variables=="E224"
order varname
gen sort=1 if varname=="IMF confidence"
replace sort=2 if varname=="Private ownership"
replace sort=3 if varname=="Corruption"
replace sort=4 if varname=="Address income inequality"
replace sort=5 if varname=="Gender equality"
replace sort=6 if varname=="Environment"
sort sort
drop sort
gen difference=mean_included-mean_not_included
gen difference_percent=(difference/mean_included)*100

export excel using "TableA16.xlsx", firstrow(variables)

*Table A17: Comparing internet users in Kenya with non-internet users in World Value Survey 
use "WVS_TimeSeries_4_0.dta", clear
keep if S002VS==7

keep if COUNTRY_ALPHA=="KEN"

replace C001=. if C001<0
replace C001=4 if C001==3
replace C001=3 if C001==2
replace C001=2 if C001==4

replace E224=. if E224<0
replace B008=. if B008<0
replace B008=. if B008==3

replace E069_45=. if E069_45<0
replace E268=. if E069_45<0
replace E035=. if E069_45<0
replace E036=. if E069_45<0

*E224 tax the rich to help poor
*C001 men more right to job than women
*B008 environment versus econ growth
*E069_45 IMF confidence
*E268 Corruption
*E035 income inequality
*E036 private ownership

replace E035=abs(E035-10)
replace E036=abs(E036-10)
replace B008=abs(B008-2)

gen sd_C001=C001
gen sd_E224=E224
gen sd_B008=B008
gen sd_E069_45=E069_45
gen sd_E035=E035
gen sd_E036=E036
gen sd_E268=E268

gen total=1
egen countries=group(COUNTRY_ALPHA)

gen internet=1 if E262B==5
replace internet=0 if missing(internet)
replace internet=. if E262B<0

collapse (mean) C001 E224 B008 E069_45 E268 E035 E036 (sd) sd_C001 sd_E224 sd_B008 sd_E069_45 sd_E035 sd_E036 sd_E268 (sum) total , by(internet)

drop if missing(internet)
replace internet=2 if internet==0
replace internet=internet-1

foreach x of varlist C001 E224 B008 E069_45 E268 E035 E036  {
rename `x' mean_`x'

}

reshape long mean_, i(internet) j(variables, string)

gen sd_=sd_C001 if variables=="C001"
replace sd_=sd_E224 if variables=="E224"
replace sd_=sd_B008 if variables=="B008"
replace sd_=sd_E069_45 if variables=="E069_45"
replace sd_=sd_E035 if variables=="E035"
replace sd_=sd_E036 if variables=="E036"
replace sd_=sd_E268 if variables=="E268"

drop sd_C001 sd_E224 sd_B008 sd_E069_45 sd_E035 sd_E036 sd_E268
gen id=1
reshape wide mean_ sd_ total, i(variables) j(internet)
drop id
order variables mean_1 sd_1 total1 mean_0 sd_0 total0
rename mean_1 mean_internet
rename sd_1 sd_internet
rename total1 n_internet
rename mean_0 mean_no_internet
rename sd_0 sd_no_internet
rename total0 n_no_internet
gen varname="IMF confidence" if variables=="E069_45"
replace varname="Private ownership" if variables=="E036"
replace varname="Corruption" if variables=="E268"
replace varname="Address income inequality" if variables=="E035"
replace varname="Gender equality" if variables=="C001"
replace varname="Environment" if variables=="B008"
drop if variables=="E224"
order varname
gen sort=1 if varname=="IMF confidence"
replace sort=2 if varname=="Private ownership"
replace sort=3 if varname=="Corruption"
replace sort=4 if varname=="Address income inequality"
replace sort=5 if varname=="Gender equality"
replace sort=6 if varname=="Environment"
sort sort
drop sort
gen difference=mean_internet-mean_no_internet
gen difference_percent=(difference/mean_internet)*100

export excel using "TableA17.xlsx", firstrow(variables)

*Figure A19: ideology Argentina
use  "IMF_survey_experiment.dta", clear

graph bar (percent) count_obs if qcountry==2, over(q4) scheme(plotplainblind) legend(off)

*Figure A20: ideology Kenya
graph bar (percent) count_obs if qcountry==1, over(q4) scheme(plotplainblind) legend(off)

*Figure A21: ideology Pakistan
graph bar (percent) count_obs if qcountry==3, over(q4) scheme(plotplainblind) legend(off)

*Figure A22: ideology and gender discrimination
use "WVS_TimeSeries_4_0.dta", clear

keep S002VS S003 COUNTRY_ALPHA S017 S020 E033 C001 D057 D058 D060 F199 E035 E036 E037 
rename S002VS wave
rename S003 country
rename COUNTR iso3
rename S020 year
order country iso3 year wave 

replace iso3="ADO" if iso3=="AND"
replace iso3="WBG" if iso3=="PSE"
replace iso3="ROM" if iso3=="ROU"
sort iso3 
merge iso3 using "Countries-iso3-unique"
tab _m 
drop if _m==2
drop _m ifs iso2 vpu isor* cow

g lr=E033 if E033>0 & E033<11
g gn_jobs=C001==1 if C001>0 & C001<4
g gn_hwife=D057==1|D057==2 if D057>0 & D057<5
g gn_uneq=D058==3|D058==4 if D058>0 & D058<5
g gn_uni=D060==1|D060==2 if D060>0 & D060<5
g gn_beat=F199-1 if F199>0 & F199<11

su lr gn_*
corr gn_jobs gn_hw gn_uni gn_beat
factor gn_jobs gn_hw gn_uni gn_beat

g c001=2*(C001==1)+1*(C001==3) if C001>0
g d057=4-D057 if D057>0
g d060=4-D060 if D060>0
g f199=F199-1 if F199>0
corr c001 d057 d060 f199
su c001 d057 d060 f199

g gn_disc=c001+d057+d060+f199
hist gn_disc
bys year: su gn_disc

corr lr gn_disc if year>=2012 & iso3=="ARG"|iso3=="PAK"|iso3=="KEN"

twoway scatter (gn_disc lr) if year>=2012 & iso3=="ARG"|iso3=="PAK"|iso3=="KEN", scheme(s1mono) ytitle(Gender discrimination index) xtitle(Left-right positioning) xsc(range(1(2)11))

pwcorr lr gn_disc if year==2017 & iso3=="ARG", sig   
pwcorr lr gn_disc if year==2012 & iso3=="PAK", sig   
pwcorr lr gn_disc if year==2021 & iso3=="KEN", sig   

*Figure A23: ideology and gender discrimination by country
twoway scatter (gn_disc lr) if year>=2012 & iso3=="ARG", scheme(s1mono) ytitle(Gender discrimination index) xtitle(Left-right positioning) xsc(range(1(2)11))
twoway scatter (gn_disc lr) if year>=2012 & iso3=="PAK", scheme(s1mono) ytitle(Gender discrimination index) xtitle(Left-right positioning) xsc(range(1(2)11))
twoway scatter (gn_disc lr) if year>=2012 & iso3=="KEN", scheme(s1mono) ytitle(Gender discrimination index) xtitle(Left-right positioning) xsc(range(1(2)11))

*Figure A24: Separate results by country
use  "IMF_survey_experiment.dta", clear

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if qcountry==1, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_kenya

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if qcountry==2, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_argentina

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] if qcountry==3, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_pakistan

coefplot support_argentina support_kenya support_pakistan, xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure A25: Argentina and Kenya
reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ  [pw = weight] if qcountry==1 | qcountry==2, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo country1

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ  [pw = weight] if qcountry==1 | qcountry==3, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo country2

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ  [pw = weight] if qcountry==2 | qcountry==3, absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo country3

coefplot country1  , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure A26: Argentina and Pakistan
coefplot country3  , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure A27: Kenya and Pakistan
coefplot country2  , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure A28: Controlling for individual-level covariates
foreach x of varlist DEM4_Ken DEM5_Ken LOC_TYPE_Ken income_Ken region_Ken education_Ar GeoPC_Region1_Ar income_Ar empl_stat_Ar employment_Pak income_Pak natgroup_Pak maritalstatus_Pak education_Pak region_Pak{
gen nm`x'=`x' 
replace nm`x'=999 if nm`x'==.
}

reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ [pw = weight] , absorb(qcountry nm*) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_controls

coefplot support_controls , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Figure A29: Estimates without probability weights
reghdfe support i.invest i.tariff i.debt i.privatize i.corrupt i.poverty i.climate i.genderequ , absorb(qcountry) cluster(id)
margins invest tariff debt corrupt poverty privatize climate genderequ , atmeans post
eststo support_noweight

coefplot support_noweight , xtitle(Marginal Means) scheme(plotplainblind) xlabel(3(0.1)4) headings(1.invest = "{bf:Open up to foreign investors}" 1.tariff = "{bf:Reduce tariffs}" 1.debt = "{bf:Reduce debt}" 1.corrupt = "{bf:Fight corruption}" 1.poverty = "{bf:Introduce anti-poverty policies}" 1.privatize = "{bf:Privatize SOEs}" 1.climate = "{bf:Fight climate change}" 1.genderequ = "{bf:Improve gender equality}")

*Table A30: Adjusting for multiple comparisons
foreach x of varlist invest tariff debt corrupt poverty privatize climate genderequ{
gen zero_`x'=`x' 
replace zero_`x'=0 if zero_`x'==2
}

label var zero_invest "Open up to foreign investors"
label var zero_tariff "Reduce tariffs"
label var zero_debt "Reduce debt"
label var zero_corrupt "Fight corruption"
label var zero_poverty "Introduce anti-poverty policies"
label var zero_privatize "Privatize SOEs"
label var zero_climate "Fight climate change"
label var zero_genderequ "Improve gender equality"


reghdfe support zero_invest zero_tariff zero_debt zero_privatize zero_corrupt zero_poverty zero_climate zero_genderequ [pw = weight] , absorb(qcountry) cluster(id)
eststo support_amce

reghdfe cuts zero_invest zero_tariff zero_debt zero_privatize zero_corrupt zero_poverty zero_climate zero_genderequ [pw = weight] , absorb(qcountry) cluster(id)
eststo cuts_amce

reghdfe taxes zero_invest zero_tariff zero_debt zero_privatize zero_corrupt zero_poverty zero_climate zero_genderequ [pw = weight] , absorb(qcountry) cluster(id)
eststo taxes_amce

esttab support_amce cuts_amce taxes_amce using BH1.rtf, star(* 0.03 ** 0.005) b(4) r2 p mlabels(,titles) l addnote("** p<0.005; FDR=0.01; * p<0.03; FDR=0.05")






